/*
 * Copyright© 2003-2019 浙江汇信科技有限公司, All Rights Reserved.
 */
package com.icinfo.cloud.provider.punish.service.impl;

import com.icinfo.cloud.common.core.page.PageResponse;
import com.icinfo.cloud.provider.common.constant.PunishMainServicePortUriConstant;
import com.icinfo.cloud.provider.common.utils.PunishMainClientUtil;
import com.icinfo.cloud.provider.punish.service.ICaseRelatedDocumentRecordService;
import com.icinfo.cloud.provider.punish.ucase.casemain.dto.CaseRelatedAppDocumentPageQueryDto;
import com.icinfo.cloud.provider.punish.ucase.casemain.dto.CaseRelatedDocumentSaveDto;
import com.icinfo.cloud.provider.punish.ucase.casemain.dto.DocumentCatalogQueryDto;
import com.icinfo.cloud.provider.punish.ucase.casemain.vo.*;
import com.icinfo.framework.common.web.Result;
import com.icinfo.framework.core.service.support.MyBatisServiceSupport;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;


import java.util.List;

/**
 * 描述: 案件关联文书记录表 case_related_document_record 对应的Service接口实现类.<br>
 *
 * @author framework generator
 * @date 2022年06月17日
 */
@Service
@Slf4j
public class CaseRelatedDocumentRecordServiceImpl extends MyBatisServiceSupport implements ICaseRelatedDocumentRecordService {

    /**
     * 获取文书类型列表
     *
     * @param queryDto
     * @return
     */
    @Override
    public Result<List<DocumentCatalogInfoVo>> getDocumentCatalogList(DocumentCatalogQueryDto queryDto) {
        return PunishMainClientUtil.httpPost(PunishMainServicePortUriConstant.GET_DOCUMENT_CATALOG_LIST, queryDto);
    }

    @Override
    public Result<PageResponse<CaseRelatedAppDocumentVo>> getCanRelatedDocumentListByPartyAndHandle(CaseRelatedAppDocumentPageQueryDto queryDto) {
        return PunishMainClientUtil.httpPost(PunishMainServicePortUriConstant.GET_RELATED_DOCUMENT_LIST, queryDto);
    }

    /**
     * 保存案件关联文书
     *
     * @param saveDto 保存dto
     * @return {@link Result<String> }
     * @author shishengyao
     * @date 2023/05/11
     */
    @Override
    public Result<String> saveCaseRelatedDocument(CaseRelatedDocumentSaveDto saveDto){
        return PunishMainClientUtil.httpPost(PunishMainServicePortUriConstant.SAVE_CASE_RELATED_DOCUMENT, saveDto);
    }
}
